/**
 * 
 */
package travibot.ui.gui.forms;

import org.eclipse.jface.resource.ImageRegistry;
import org.eclipse.swt.SWT;
import org.eclipse.swt.graphics.Point;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Tree;

import travibot.ui.gui.forms.viewers.CityListViewer;


/**
* This code was edited or generated using CloudGarden's Jigloo
* SWT/Swing GUI Builder, which is free for non-commercial
* use. If Jigloo is being used commercially (ie, by a corporation,
* company or business for any purpose whatever) then you
* should purchase a license for each developer using Jigloo.
* Please visit www.cloudgarden.com for details.
* Use of Jigloo implies acceptance of these licensing terms.
* A COMMERCIAL LICENSE HAS NOT BEEN PURCHASED FOR
* THIS MACHINE, SO JIGLOO OR THIS CODE CANNOT BE USED
* LEGALLY FOR ANY CORPORATE OR COMMERCIAL PURPOSE.
*/
/**
 * @author tajzivit
 *
 */
public class CityList extends Composite implements CompositeForm {


    private MainForm mainForm = null;  //  @jve:decl-index=0:
    private Tree cityListTree = null;
    private CityListViewer viewer = null;
    
    

    
    public MainForm getMainForm() {
    
        return mainForm;
    }

    
    public void setMainForm(MainForm mainform) {
    
        this.mainForm = mainform;
    }

    public CityList(Composite parent, int style) {

        super(parent, style);
        initialize();
    }
    
    public void setInput(Object session){
        
        viewer.setInput(session);
    }

    private void initialize() {

        GridLayout cityListLayout = new GridLayout();
        cityListLayout.horizontalSpacing = 0;
        cityListLayout.marginWidth = 0;
        cityListLayout.marginHeight = 0;
        cityListLayout.verticalSpacing = 0;               
        GridData cityListLData = new GridData();
        cityListLData.grabExcessHorizontalSpace = true;  // Generated
        cityListLData.horizontalAlignment = GridData.FILL;  // Generated
        cityListLData.verticalAlignment = GridData.FILL;  // Generated
        cityListLData.grabExcessVerticalSpace = true;  // Generated
        cityListTree = new Tree(this, SWT.BORDER);
        cityListTree.setLayoutData(cityListLData);  // Generated
        viewer = new CityListViewer(cityListTree);
        this.setLayout(cityListLayout);
        setSize(new Point(152, 200));
    }


    public void setImageRegistry(ImageRegistry imageRegistry) {

        // TODO Auto-generated method stub
        
    }

   

}  //  @jve:decl-index=0:visual-constraint="10,10"
